x86/mm: add HVMOP_get_mem_type hvmop
authorOlaf Hering <olaf@aepfle.de>
Wed, 4 May 2011 12:37:58 +0000 (13:37 +0100)
committerOlaf Hering <olaf@aepfle.de>
Wed, 4 May 2011 12:37:58 +0000 (13:37 +0100)
commit0f2dae90062ead5ae7ecd483ba3bd3ccb6686fe1
treeb7795efdc022fe301dc9226ae828837acbe1a335
parentd0ef88916f3ab8bda754b175b299e3d5a73fe851
x86/mm: add HVMOP_get_mem_type hvmop

The balloon driver in the guest frees guest pages and marks them as
mmio. When the kernel crashes and the crash kernel attempts to read the
oldmem via /proc/vmcore a read from ballooned pages will generate 100%
load in dom0 because Xen asks qemu-dm for the page content. Since the
reads come in as 8byte requests each ballooned page is tried 512 times.

Add a new hvmop HVMOP_get_mem_type to return the hvmmem_type_t for the
given pfn. Pages which are neither ram or mmio will be HVMMEM_mmio_dm.
This interface enables the crash kernel to skip ballooned pages.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/ia64/vmx/vmx_hypercall.c
xen/arch/x86/hvm/hvm.c
xen/include/public/hvm/hvm_op.h